package com.guodi.model.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

import javax.validation.constraints.NotBlank;
import java.io.Serializable;
import java.util.Date;

/**
 * @描述：指标信息表
 * @作者: 彭辉
 * @日期: 2020-06-05
 */
@Getter
@Setter
@ApiModel(value = "指标信息表")
public class IdtIndicators implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "主键id")
    private String id;

    @NotBlank(message = "指标名称不能为空")
    @ApiModelProperty(value = "指标名称", required = true)
    private String name;

    @NotBlank(message = "指标编号不能为空")
    @ApiModelProperty(value = "指标编号", required = true)
    private String code;

    @NotBlank(message = "指标类型不能为空")
    @ApiModelProperty(value = "指标类型", required = true)
    private String type;

    @ApiModelProperty(value = "指标单位")
    private String unit;

    @NotBlank(message = "指标属性不能为空")
    @ApiModelProperty(value = "指标属性", required = true)
    private String attribute;

    @NotBlank(message = "指标范围不能为空")
    @ApiModelProperty(value = "指标范围", required = true)
    private String scope;

    @ApiModelProperty(value = "指标内涵")
    private String connotation;

    @ApiModelProperty(value = "采集单位")
    private String gatherCompany;

    @ApiModelProperty(value = "责任单位")
    private String dutyCompany;

    @ApiModelProperty(value = "更新周期")
    private String updateCycle;

    @ApiModelProperty(value = "指标计算及来源说明")
    private String calculateSource;

    @ApiModelProperty(value = "重要程度")
    private String importantLevel;

    @ApiModelProperty(value = "行政区划代码", required = true)
    private String divisionCode;

    @TableField(exist = false)
    @ApiModelProperty(value = "行政区划名称", hidden = true)
    private String divisionName;

    @ApiModelProperty(value = "单位/机构id", hidden = true)
    private String orgId;

    @ApiModelProperty(value = "是否公共指标", required = true)
    private Integer isPublic;

    @ApiModelProperty(value = "排序")
    private String sort;

    @ApiModelProperty(value = "排序状态(指标填报)")
    private Integer sortStatus;

    @TableField(exist = false)
    @ApiModelProperty(value = "排序方式", hidden = true)
    private String sortWay;

    @ApiModelProperty(value = "预警规则id")
    @NotBlank(message = "预警规则不能为空")
    private String warnRuleId;

    @NotBlank(message = "数据来源不能为空")
    @ApiModelProperty(value = "数据来源", required = true)
    private String datasource;

    @ApiModelProperty(value = "数据来源-计算公式")
    private String calculateFormula;

    @ApiModelProperty(value = "数据来源-关联模型id")
    private String modelId;

    @ApiModelProperty(value = "数据来源-关联模型取值内容")
    private String modelKeyField;

    @ApiModelProperty(value = "数据来源-关联模型取值字段")
    private String modelValueField;

    @ApiModelProperty(value = "更新监测值状态")
    private String updateStatus;

    @ApiModelProperty(value = "更新监测值时间")
    private String updateTime;

    @ApiModelProperty(value = "更新上报值状态")
    private String updateReportStatus;

    @ApiModelProperty(value = "更新上报值时间")
    private String updateReportTime;

    @ApiModelProperty(value = "指标更新类型（0：自动更新，1：手动更新）")
    private Integer updateType;

    @ApiModelProperty(value = "备注")
    private String remark;

    @ApiModelProperty(value = "创建人", hidden = true)
    private String creator;

    @ApiModelProperty(value = "创建时间", hidden = true)
    private Date createTime;

    @ApiModelProperty(value = "修改人", hidden = true)
    private String modifier;

    @ApiModelProperty(value = "修改时间", hidden = true)
    private Date modifyTime;

    /**
    * @描述: 20201106新增字段
    * @作者: 代鹏刚
    * @日期: 2020/11/6 16:02
    **/
    @ApiModelProperty(value = "责任处室")
    private String dutyDepartment;

    @ApiModelProperty(value = "最终计算单位")
    private String calculateUnit;

    @ApiModelProperty(value = "基础数据")
    private String baseData;

    @ApiModelProperty(value = "基础数据来源")
    private String baseDataSource;

    @ApiModelProperty(value = "数值类型-数据来源于模型结果")
    private String dataType;

    @ApiModelProperty(value = "基期年")
    private String baseYear;

    @ApiModelProperty(value = "基期值")
    private String baseValue;

    @ApiModelProperty(value = "复合指标计算公司")
    private String calculateResult;

    @ApiModelProperty(value = "说明")
    @TableField(exist = false)
    private String explain;

    @ApiModelProperty(value = "当前年监测值")
    @TableField(exist = false)
    private Double dValue;

    @ApiModelProperty(value = "上一年监测值")
    @TableField(exist = false)
    private Double lValue;

    @ApiModelProperty(value = "截止日期")
    @TableField(exist = false)
    private String cutOffDate;

    @ApiModelProperty(value = "被引用的复合指标集合")
    @TableField(exist = false)
    private String tips;

    @ApiModelProperty(value = "排序数值")
    @TableField(exist = false)
    private Integer sortNum;

    /**
    * @描述: 20210802新增表字段
    * @作者: 代鹏刚
    * @日期: 2021/8/2 17:41
    **/
    @ApiModelProperty(value = "指标预警规则配置")
    private String warnRuleConfig;

    /**
     * @描述: 20230424新增表字段
     * @作者: lzy
     * @日期: 2023/4/24 17:41
     **/
    @ApiModelProperty(value = "评估规则配置")
    private String estimateRuleConfig;

    @ApiModelProperty(value = "责任单位类型")
    private String dutyCompanyType;
}
